import 'package:flutter/material.dart';
import 'package:flutter_base/provider_demo2/pages/second_page.dart';
import 'package:provider/provider.dart';
import 'package:flutter_base/provider_demo2/models/counter_model.dart';
import 'package:flutter_base/provider_demo2/pages/first_page.dart';
import 'package:flutter_base/provider_demo2/pages/home.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider.value(
      value: CounterModel(),
      child: MaterialApp(
        routes: {
          '/': (context) => const HomePage(),
          'first_page': (context) => const FirstPage(),
          'second_age': (context) => const SecondPage(),
        },
        initialRoute: '/',
      ),
    );
  }
}
